<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class EnsureTokenIsValid
{
    /**
     * Handle an incoming request.
     *
     * @param \Closure(Request): (Response) $next
     */
    public function handle(Request $request, Closure $next): Response
    {
//        if ($request->user() &&  strtotime($request->user()->created_at) + 60 * 60 < time()) {
//            return \Jiannei\Response\Laravel\Support\Facades\Response::fail('体验已过期，请联系官方客服开通服务');
//        }
        return $next($request);
    }
}
